package com.fcx.workai.loginmodule.api;


import com.fcx.workai.loginmodule.api.request.Request_BindCustomer;
import com.fcx.workai.loginmodule.api.request.Request_SignResult;
import com.fcx.workai.loginmodule.api.request.Request_SpaceInfo;
import com.fcx.workai.loginmodule.api.request.Request_StepOneInfo;
import com.fcx.workai.loginmodule.bean.OssUrlBean;
import com.fcx.workai.loginmodule.bean.UsersInfoDataBean;
import com.hxh.component.basicannotation.annotation.ApiServices;
import com.hxh.component.basicannotation.annotation.UseMRecycleView;
import com.hxh.component.basicore.ui.recycleview.mrecycleview.NetResultBean;
import com.hxh.component.business.bean.OpenProgressBean;
import com.hxh.component.business.common.UserInfoBean;
import com.hxh.component.business.common.api.Request_GetVerityCode;
import com.hxh.component.business.common.bean.UserCustomerListBean;
import com.hxh.component.business.ui.bean.UserCompanyListBean;
import com.hxh.component.business.utils.Constant;

import com.fcx.workai.loginmodule.api.request.Request_PwdLogin;
import com.fcx.workai.loginmodule.api.request.Request_RefreshToken;
import com.fcx.workai.loginmodule.api.request.Request_Setpwd;
import com.fcx.workai.loginmodule.api.request.Request_SmsLogin;
import com.fcx.workai.loginmodule.bean.UserSetPwdResultBean;
import retrofit2.Response;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;

/**
 * des:登录模块接口
 *
 * @author fuchengxiang
 * @version 1.0
 * @date 2019/7/30
 */
@ApiServices(Constant.APIServicesTag.API_APISERVICES)
public interface LoginServices {

    
    /**
     * 密码登录
     * @param 
     * @author hxh
     * @time 2017/8/16 13:40
     * @return 
    */
    @POST("uaa/v1/auth/tokens")
    Observable<UserInfoBean> login_pwd(@Body Request_PwdLogin body);
    
    /**
     * 验证码登录
     * @param 
     * @author hxh
     * @time 2017/8/16 11:17
     * @return 
    */
    @POST("uaa/v1/auth/tokens")
    Observable<UserInfoBean> login_sms(@Body Request_SmsLogin body);

    /**
     * 设置密码
     * @param body
     * @return
     */
    @PUT("uaa/v1/users/{id}/set-pwd")
    Observable<UserSetPwdResultBean> setpwd(@Path("id") String userid,
                                            @Body Request_Setpwd body);

    /**
     * 获取客户列表
     * @param
     * @author wangyu
     * @time 2017/11/27 21:10
     * @return
     */
    @GET("crm/v1/customers")
    Observable<UserCustomerListBean> getUserCustomerList(@Query("limit")String limit,
                                                         @Query("offset")String offset);

    /**
     * 刷新token
     * @return
     */
    @POST("uaa/v1/auth/tokens")
    Observable<UserInfoBean> refreToken(@Body Request_RefreshToken body);



    @POST("sms/v1/sms_codes")
    Observable<Response<Void>> getVerityCode(@Body Request_GetVerityCode body);

    /**
     * 获取用户所在企业列表
     * @param
     * @author hxh
     * @time 2017/8/16 11:17
     * @return
     */
    @GET("uaa/v1/tenants")
    Observable<UserCompanyListBean> getUserCompanyList(@Query("all") boolean isall, @Query("keysearch") String keysearch);


    /**
     * 身份证验证返回识别信息
     *
     * @param body
     * @return
     */
    @POST("/common/v1/ocr/id-card-verify")
    Observable<String> uploadIdCard(@Body String body);

    /**
     * 身份证验证返回识别信息(带保存)
     *
     * @param body
     * @return
     */
    @POST("/uaa/v1/users/auth")
    Observable<String> uploadIdCard02(@Body String body);
//
//    /**
//     * 活体人脸验证
//     * @param body
//     * @return
//     */
//    @POST("/contract/v1/auth/live-face-verify")
//    Observable<String> verityFace(@Body String body);

    /**
     * 活体人脸验证 新
     * @param body
     * @return
     */
    @POST("/common/v1/ocr/face-id-verify")
//    Observable<faceCheckBean> verityFace(@Body String body);
    Observable<String> verityFace(@Body String body);

    /**
     * 有编号确认加入(创客编号)
     * @param body
     * @return
     */
    @POST("socialwork/v1/common/bind-customer")
    Observable<Response<Void>> getBindCustomer(@Body Request_BindCustomer body);

    /**
     * 无编号提交信息(创客编号)
     * @param body
     * @return
     */
    @POST("socialwork/v1/individual-house-businesses/apply-info")
    Observable<Response<Void>> getCommitCustomerInfo(@Body Request_SpaceInfo body);

    /**
     * 提交个体户申请资料(第一步验证)
     * @param body
     * @return
     */
    @POST("socialwork/v1/individual-house-businesses/op/submit")
    Observable<Response<Void>> getCommitStepOneInfo(@Body Request_StepOneInfo body);


    /**
     * 获取用户信息
     * @return
     */

    @GET("uaa/v1/users/{id}")
    Observable<UsersInfoDataBean> getUsersData(@Path("id") String id);

    /**
     * APP阅读开户须知
     */
    @PUT("/socialwork/v1/individual-house-businesses/read_open_notice")
    Observable<Response<Void>> getReadOpenNotice();
}
